<extend name="Member:base" />
<block name="title"><title>心心向善-实物交易订单</title></block>
		<!-- 头部结束-->
<block name="body">
<!-- 上传插件 -->
<script type="text/javascript" src='__PUBLIC__/Uploadify/jquery-1.7.2.min.js'></script>
<link rel="stylesheet" href="__PUBLIC__/Uploadify/uploadify.css"/>
<script type="text/javascript" src='__PUBLIC__/Uploadify/jquery.uploadify.min.js'></script>
<script type='text/javascript'>
    
        var PUBLIC = '__PUBLIC__';
        var uploadUrl = '{:U("Common/uploadFace")}';
        var ROOT = '__ROOT__';
        // alert(PUBLIC);
        // alert(uploadUrl);
        // alert(ROOT);
</script>

<script type="text/javascript">
 //上传插件
$(function() {
 
 $('#face1').uploadify({
 	
        swf : PUBLIC + '/Uploadify/uploadify.swf',  //引入Uploadify核心Flash文件
        uploader : uploadUrl,   //PHP处理脚本地址
        // width : 120,    //上传按钮宽度
        width : 95,    //上传按钮宽度
        height : 30,    //上传按钮高度
        // buttonImage : PUBLIC + '/Uploadify/browse-btn.png', //上传按钮背景图地址
        buttonImage : PUBLIC + '/Uploadify/browse-btn_02.png', //上传按钮背景图地址
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',   //允许选择的文件类型
//      formData : {'session_id' : sid},
        //上传成功后的回调函数
        onUploadSuccess : function (file, data, response) {
            // alert(data);
            eval('var data = ' + data);
            if (data.status) {
                $('#face-img1').attr('src', ROOT + '/Uploads/' + data.path);
                $('input[name=sd_pic1]').val('/Uploads/'+data.path);
            } else {
                alert(data.msg);
            }
        }
    });

  $('#face2').uploadify({
        swf : PUBLIC + '/Uploadify/uploadify.swf',  //引入Uploadify核心Flash文件
        uploader : uploadUrl,   //PHP处理脚本地址
        // width : 120,    //上传按钮宽度
        width : 95,    //上传按钮宽度
        height : 30,    //上传按钮高度
        // buttonImage : PUBLIC + '/Uploadify/browse-btn.png', //上传按钮背景图地址
        buttonImage : PUBLIC + '/Uploadify/browse-btn_02.png', //上传按钮背景图地址
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',   //允许选择的文件类型
//      formData : {'session_id' : sid},
        //上传成功后的回调函数
        onUploadSuccess : function (file, data, response) {
            // alert(data);
            eval('var data = ' + data);
            if (data.status) {
                $('#face-img2').attr('src', ROOT + '/Uploads/' + data.path);
                $('input[name=sd_pic2]').val('/Uploads/'+data.path);
            } else {
                alert(data.msg);
            }
        }
    });

   $('#face3').uploadify({
        swf : PUBLIC + '/Uploadify/uploadify.swf',  //引入Uploadify核心Flash文件
        uploader : uploadUrl,   //PHP处理脚本地址
        // width : 120,    //上传按钮宽度
        width : 95,    //上传按钮宽度
        height : 30,    //上传按钮高度
        // buttonImage : PUBLIC + '/Uploadify/browse-btn.png', //上传按钮背景图地址
        buttonImage : PUBLIC + '/Uploadify/browse-btn_02.png', //上传按钮背景图地址
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',   //允许选择的文件类型
//      formData : {'session_id' : sid},
        //上传成功后的回调函数
        onUploadSuccess : function (file, data, response) {
            // alert(data);
            eval('var data = ' + data);
            if (data.status) {
                $('#face-img3').attr('src', ROOT + '/Uploads/' + data.path);
                $('input[name=sd_pic3]').val('/Uploads/'+data.path);
            } else {
                alert(data.msg);
            }
        }
    });

    $('#face4').uploadify({
        swf : PUBLIC + '/Uploadify/uploadify.swf',  //引入Uploadify核心Flash文件
        uploader : uploadUrl,   //PHP处理脚本地址
        // width : 120,    //上传按钮宽度
        width : 95,    //上传按钮宽度
        height : 30,    //上传按钮高度
        // buttonImage : PUBLIC + '/Uploadify/browse-btn.png', //上传按钮背景图地址
        buttonImage : PUBLIC + '/Uploadify/browse-btn_02.png', //上传按钮背景图地址
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',   //允许选择的文件类型
//      formData : {'session_id' : sid},
        //上传成功后的回调函数
        onUploadSuccess : function (file, data, response) {
            // alert(data);
            eval('var data = ' + data);
            if (data.status) {
                $('#face-img4').attr('src', ROOT + '/Uploads/' + data.path);
                $('input[name=sd_pic4]').val('/Uploads/'+data.path);
            } else {
                alert(data.msg);
            }
        }
    });

     $('#face5').uploadify({
        swf : PUBLIC + '/Uploadify/uploadify.swf',  //引入Uploadify核心Flash文件
        uploader : uploadUrl,   //PHP处理脚本地址
        // width : 120,    //上传按钮宽度
        width : 95,    //上传按钮宽度
        height : 30,    //上传按钮高度
        // buttonImage : PUBLIC + '/Uploadify/browse-btn.png', //上传按钮背景图地址
        buttonImage : PUBLIC + '/Uploadify/browse-btn_02.png', //上传按钮背景图地址
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',   //允许选择的文件类型
//      formData : {'session_id' : sid},
        //上传成功后的回调函数
        onUploadSuccess : function (file, data, response) {
            // alert(data);
            eval('var data = ' + data);
            if (data.status) {
                $('#face-img5').attr('src', ROOT + '/Uploads/' + data.path);
                $('input[name=sd_pic5]').val('/Uploads/'+data.path);
            } else {
                alert(data.msg);
            }
        }
    });
 
 
 });
 </script>
 <style>
 .uploadify-button {
    border-radius: 0px;
    border: 0px solid #808080;
}
 </style>

			<!--<主要区块>-->

			<div class="right-layout">

				<div class="ncm-flow-layout">
					<div class="ncm-flow-container">
						<div class="title">
							<a href="javascript:history.go(-1);" class="ncm-btn-mini fr">返&nbsp;回</a>
							<h3>对商品进行晒单</h3>
						</div>
						<div class="alert">
							<h4>图片上传要求：</h4> 请使用jpg\jpeg\png等格式、单张大小不超过1M的图片，最多可发布5张晒图，上传后的图片也将被保存在个人主页相册中以便其它使用。 </div>
						<form id="add_form" action="wysd.html" method="post">
							<input type="hidden" name="pjid" value="{$pjid}">
							<div class=" ncm-default-form">
								<h3>评价信息</h3>
								<dl>
									<dt>商品信息：</dt>
									<dd>
										<div>
											<a href="#" target="_blank"><img src="{$list.product_pic}"></a>
											<a href="#" target="_blank">{$list.product_name}</a>
										</div>
									</dd>
								</dl>
								<dl>
									<dt>商品评分：</dt>
									<dd>
									<if condition="$list.pj_level eq 1" >
										<div class="raty" style="display: inline-block; width: 100px;" data-score="1" title="很不满意"><img src="__PUBLIC__/Home/images/star-on.png" alt="1" title="很不满意"><input type="hidden" name="score" value="1" readonly="readonly"></div>
									</if>
									<if condition="$list.pj_level eq 2" >
										<div class="raty" style="display: inline-block; width: 100px;" data-score="2" title="不满意"><img src="__PUBLIC__/Home/images/star-on.png" alt="1" title="不满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="2" title="不满意"><input type="hidden" name="score" value="2" readonly="readonly"></div>
									</if>
									<if condition="$list.pj_level eq 3" >
										<div class="raty" style="display: inline-block; width: 100px;" data-score="3" title="一般"><img src="__PUBLIC__/Home/images/star-on.png" alt="1" title="一般">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="2" title="一般">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="3" title="一般"><input type="hidden" name="score" value="3" readonly="readonly"></div>
									</if>
									<if condition="$list.pj_level eq 4" >
										<div class="raty" style="display: inline-block; width: 100px;" data-score="4" title="满意"><img src="__PUBLIC__/Home/images/star-on.png" alt="1" title="满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="2" title="满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="3" title="满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="4" title="满意"><input type="hidden" name="score" value="4" readonly="readonly"></div>
									</if>
									<if condition="$list.pj_level eq 5" >
										<div class="raty" style="display: inline-block; width: 100px;" data-score="5" title="很满意"><img src="__PUBLIC__/Home/images/star-on.png" alt="1" title="很满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="2" title="很满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="3" title="很满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="4" title="很满意">&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="5" title="很满意"><input type="hidden" name="score" value="5" readonly="readonly"></div>
									</if>
									</dd>
								</dl>
								<dl>
									<dt>评价详情：</dt>
									<dd>{$list.pj_content}</dd>
								</dl>
								<h3 class="mt20">上传晒单图片</h3>
								<div class="evaluation-image">
									<ul class="edit-face">
										<li>
											<div class="upload-thumb">
												<div nctype="image_item" style="display:none;"> <img src="" id='face-img1'>
													<!-- <input type="hidden" nctype="input_image" name="evaluate_image[]" value="">
													<a href="javascript:;" nctype="del" class="del" title="移除">X</a> -->
												</div>
											</div>
											<div class="upload-btn">
												<!-- <a href="javascript:void(0);">  -->
												<span style="display: block;position: relative;z-index: 1;">
                <!-- <input type="file" hidefocus="true" size="1" class="input-file" name="file"> -->
                <input type="file" name='face1' id='face1'/>
				<input type="hidden" name='sd_pic1' value=''/>
                </span>
													<!-- <p>图片上传</p> -->
												<!-- </a> -->
											</div>
										</li>
										<li>
											<div class="upload-thumb">
												<div nctype="image_item" style="display:none;"> <img src="" id='face-img2'>
													<!-- <input type="hidden" nctype="input_image" name="evaluate_image[]" value="">
													<a href="javascript:;" nctype="del" class="del" title="移除">X</a> -->
												</div>
											</div>
											<div class="upload-btn">
												<!-- <a href="javascript:void(0);">  -->
												<span style="display: block;position: relative;z-index: 1;">
                <!-- <input type="file" hidefocus="true" size="1" class="input-file" name="file"> -->
                <input type="file" name='face2' id='face2'/>
				<input type="hidden" name='sd_pic2' value=''/>
                </span>
													<!-- <p>图片上传</p> -->
												<!-- </a> -->
											</div>
										</li>
										<li>
											<div class="upload-thumb">
												<div nctype="image_item" style="display:none;"> <img src="" id='face-img3'>
													<!-- <input type="hidden" nctype="input_image" name="evaluate_image[]" value="">
													<a href="javascript:;" nctype="del" class="del" title="移除">X</a> -->
												</div>
											</div>
											<div class="upload-btn">
												<!-- <a href="javascript:void(0);">  -->
												<span style="display: block;position: relative;z-index: 1;">
                <!-- <input type="file" hidefocus="true" size="1" class="input-file" name="file"> -->
                <input type="file" name='face3' id='face3'/>
				<input type="hidden" name='sd_pic3' value=''/>
                </span>
													<!-- <p>图片上传</p> -->
												<!-- </a> -->
											</div>
										</li>
										<li>
											<div class="upload-thumb">
												<div nctype="image_item" style="display:none;"> <img src="" id='face-img4'>
													<!-- <input type="hidden" nctype="input_image" name="evaluate_image[]" value="">
													<a href="javascript:;" nctype="del" class="del" title="移除">X</a> -->
												</div>
											</div>
											<div class="upload-btn">
												<!-- <a href="javascript:void(0);"> -->
												 <span style="display: block;position: relative;z-index: 1;">
                <!-- <input type="file" hidefocus="true" size="1" class="input-file" name="file"> -->
                <input type="file" name='face4' id='face4'/>
				<input type="hidden" name='sd_pic4' value=''/>
                </span>
													<!-- <p>图片上传</p> -->
												<!-- </a> -->
											</div>
										</li>
										<li>
											<div class="upload-thumb">
												<div nctype="image_item" style="display:none;"> <img src="" id='face-img5'>
													<!-- <input type="hidden" nctype="input_image" name="evaluate_image[]" value="">
													<a href="javascript:;" nctype="del" class="del" title="移除">X</a> -->
												</div>
											</div>
											<div class="upload-btn">
												<!-- <a href="javascript:void(0);">  -->
												<span style="display: block;position: relative;z-index: 1;">
                <!-- <input type="file" hidefocus="true" size="1" class="input-file" name="file"> -->
                <input type="file" name='face5' id='face5'/>
				<input type="hidden" name='sd_pic5' value=''/>
                </span>
													<!-- <p>图片上传</p> -->
												<!-- </a> -->
											</div>
										</li>
									</ul>
								</div>
								<div class="bottom">
									<label class="submit-border">
            <input id="btn_submit" class="submit" type="submit" value="确定提交">
          </label>
								</div>
							</div>
						</form>
					</div>
					<div class="ncm-flow-item">
					</div>
				</div>
				<!--<script type="text/javascript" src="http://www.rate.net/data/resource/js/jquery.raty/jquery.raty.min.js"></script>
				<script type="text/javascript" src="http://www.rate.net/data/resource/js/fileupload/jquery.iframe-transport.js" charset="utf-8"></script>
				<script type="text/javascript" src="http://www.rate.net/data/resource/js/fileupload/jquery.ui.widget.js" charset="utf-8"></script>
				<script type="text/javascript" src="http://www.rate.net/data/resource/js/fileupload/jquery.fileupload.js" charset="utf-8"></script>
				<script type="text/javascript">
					$(document).ready(function() {
						$('.raty').raty({
							path: "http://www.rate.net/data/resource/js/jquery.raty/img",
							readOnly: true,
							score: function() {
								return $(this).attr('data-score');
							}
						});

						//图片上传
						$(".input-file").fileupload({
							dataType: 'json',
							url: "http://www.rate.net/shop/index.php?act=sns_album&op=swfupload",
							formData: "",
							add: function(e, data) {
								data.formData = {
									category_id: 3
								}
								data.submit();
							},
							done: function(e, data) {
								if(data.result.state) {
									$item = $(this).parents('li');
									$item.find('img').attr('src', data.result.file_url);
									$item.find('[nctype="input_image"]').val(data.result.file_name);
									var file_id = $item.find('[nctype="del"]').attr('data-file-id');
									album_pic_del(file_id);
									$item.find('[nctype="del"]').attr('data-file-id', data.result.file_id);
									$item.find('[nctype="image_item"]').show();
								} else {
									showError(data.result.message);
								}
							}
						});

						$('[nctype="del"]').on('click', function() {
							album_pic_del($(this).attr('data-file-id'));
							$item = $(this).parent();
							$item.find('[nctype="input_image"]').val('');
							$item.hide();
						});

						function album_pic_del(file_id) {
							var del_url = "http://www.rate.net/shop/index.php?act=sns_album&op=album_pic_del";
							del_url += '&id=' + file_id;
							$.get(del_url);
						}

						$('#btn_submit').on('click', function() {
							ajaxpost('add_form', '', '', 'onerror')
						});
					});
				</script>-->
			</div>

			<!--</主要区块>-->
			<div class="clear"></div>
		</div>
	</block>